<?php
ob_start();
session_start();
// --------- config ---------------
require 'config/database.php';
require 'config/config_var.php';
$config_var			= new config_var();

// --------- function ---------------
require 'include/functions/functions.php';
$func				= new functions();

// --------- database ---------------
require 'application/model/database.php';
$database 			= new database();
$database->Connect(); 

require 'application/model/language_class.php';
require 'application/model/useradmin_class.php';
require 'application/model/interfaces_class.php';
require 'application/model/news_type_class.php';
require 'application/model/news_detail_class.php';
require 'application/model/news_class.php';
require 'application/model/connective_class.php';
require 'application/model/support_class.php';
require 'application/model/contact_class.php';

$language_class				= new language();
$useradmin_class			= new useradmin();
$interfaces_class			= new interfaces();
$news_type_class			= new news_type();
$news_detail_class			= new news_detail();
$news_class					= new news();
$connective_class			= new connective();
$support_class				= new support();
$contact_class				= new contact();

// --------- language ---------------
require 'language/config_nc.php';
require 'language/news_type_nc.php';
require 'language/news_detail_nc.php';
require 'language/news_nc.php';
require 'language/connective_nc.php';
require 'language/support_nc.php';
require 'language/contact_nc.php';
$WEB_LANGUAGE				= $func->GetSession('WEB_LANGUAGE');
if(isset($_POST['wlanguage'])){
	$WEB_LANGUAGE = $_POST['wlanguage'];
	$func->SetSession('WEB_LANGUAGE',$WEB_LANGUAGE);
}
$config_nc					= new Config_nc($WEB_LANGUAGE);
$news_type_nc				= new news_type_nc($WEB_LANGUAGE);
$news_detail_nc				= new news_detail_nc($WEB_LANGUAGE);
$news_nc					= new news_nc($WEB_LANGUAGE);
$connective_nc				= new connective_nc($WEB_LANGUAGE);
$support_nc					= new support_nc($WEB_LANGUAGE);
$contact_nc					= new contact_nc($WEB_LANGUAGE);

$WEB_DOMAIN					= $config_var->WEB_DOMAIN;
$WEB_ADMIN					= 'admincp';
$WEB_IP						= $func->getRealIPAddress();
$WEB_SESSIONID				= session_id();
$Row_Language   			= $language_class->GetByAll();

if($func->sql_injection()){	
	$WEB_PAGE = 'home';
	$WEB_PAGE= $func->html_get('u1');
	switch($WEB_PAGE){		
		default:						include('application/view/home.php'); break;	
	}	
}else{
	header('Location:./error.html');
}




?>